import {lazy} from "react" //实现路由懒加载
let routerList = [
    {
        path:"/all",
        component:lazy(()=>import("../views/all")),
        children:[
            {
                path:"/all/movie",
                component:lazy(()=>import("../views/movie")),
                title:"电影",
                icon:"search"
            },
            {
                path:"/all/video",
                component:lazy(()=>import("../views/video")),
                title:"视频",
                icon:"friends-o"
            },
            {
                path:"/all/smallvideo",
                component:lazy(()=>import("../views/smallvideo")),
                title:"小视频",
                icon:"setting-o"
            },
            {
                path:"/all/show",
                component:lazy(()=>import("../views/show")),
                title:"演出",
                icon:'shopping-cart-o'
            },
            {
                path:"/my",
                title:"我的",
                icon:'shopping-cart-o'
            },
            {
                from:"/all",
                to:"/all/movie"
            }
        ]
    },
    {
        path:"/my",
        component:lazy(()=>import("../views/my")),
        // title:"我的",
        // icon:'shopping-cart-o'
    },
    {
        path:"/login",
        component:lazy(()=>import("../views/login")),
        // title:"我的",
        // icon:'shopping-cart-o'
    },
    {
        path:"/detail/:id",
        component:lazy(()=>import("../views/detail")),
        // title:"我的",
        // icon:'shopping-cart-o'
    },
    {
        from:"/",
        to:"/all"
    }
]
export default routerList